MutableIterable

interface MutableIterable<out T> : Iterable<T>

Classes that inherit from this interface can be represented as a sequence of elements that can be iterated over and that supports removing elements during iteration.

Parameters

T

the type of element being iterated over. The mutable iterator is invariant in its element type.

Functions

iterator
Link copied to clipboard
abstract operator override fun iterator(): MutableIterator<T>

Returns an iterator over the elements of this sequence that supports removing elements during iteration.

Inheritors

MutableCollection
Link copied to clipboard

Extensions

removeAll
Link copied to clipboard
fun <T> MutableIterable<T>.removeAll(predicate: (T) -> Boolean): Boolean

Removes all elements from this MutableIterable that match the given predicate.

retainAll
Link copied to clipboard
fun <T> MutableIterable<T>.retainAll(predicate: (T) -> Boolean): Boolean

Retains only elements of this MutableIterable that match the given predicate.